package com.example.app.Entity;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import java.util.List;

@Dao
public interface LikeDao {
    @Insert
    void insert(Like like);
    
    @Query("SELECT * FROM likes WHERE post_id = :postId")
    List<Like> getLikesByPostId(Long postId);
    
    @Query("DELETE FROM likes WHERE user_id = :userId AND post_id = :postId")
    void deleteLike(Long userId, Long postId);
}